<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('展业端管理分润明细对账文件列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <label style="width: 80px;">选择日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginAddDate"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endAddDate"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "channelBillQbProfit/channelBillQbProfit";

        $(function() {
            var options = {
                url: prefix + "/listMap",
                modalName: "展业端管理分润明细对账文件列表",
                columns: [
                {
                    field: 'id',
                    title: 'ID主键',
                    visible: false
                },
                {
                    field: 'MSG_TYPE',
                    title: '交易类型',
                    formatter:function(value,row,index){
                        if (value == '1761'){
                            return "WAP最优惠消费";
                        } else if (value == '1801'){
                            return "WAP好优选消费";
                        } else if (value == '1821'){
                            return "WAP全积分消费";
                        } else if (value == '1411'){
                            return "银联二维码被扫";
                        } else if (value == '1611'){
                            return "银联二维码主扫";
                        } else if (value == '3091'){
                            return "预授权完成撤销";
                        } else if (value == '1091'){
                            return "预授权完成";
                        } else if (value == '1621'){
                            return "支付宝主扫";
                        } else if (value == '1861'){
                            return "银联在线";
                        } else if (value == '1211'){
                            return "主动提现";
                        } else if (value == '1221'){
                            return "自动提现";
                        } else if (value == '1311'){
                            return "满额提现";
                        } else if (value == '1431'){
                            return "微信被扫";
                        } else if (value == '1941'){
                            return "云闪付";
                        } else if (value == '1841'){
                            return "手机pay";
                        } else if (value == '1101'){
                            return "消费";
                        } else if (value == '5151'){
                            return "退货";
                        } else if (value == '1421'){
                            return "支付宝被扫";
                        } else if (value == '1631'){
                            return "微信主扫";
                        } else {
                            return "未知";
                         }
                    }
                },
                {
                    field: 'AMOUNT',
                    title: '交易金额',
                    formatter: function (value, row, index) {
                        return $.table.rmbFormatter(value);
                    }
                },
                {
                    field: 'PAY_NUMBER',
                    title: '笔数'
                },
                {
                    field: 'PARTNER_CHANGE',
                    title: '通道成本',
                    formatter: function (value, row, index) {
                        return $.table.rmbFormatter(value);
                    }
                },
                {
                    field: 'MER_CHANGE',
                    title: '商户手续费',
                    formatter: function (value, row, index) {
                        return $.table.rmbFormatter(value);
                    }
                },
                {
                    field: 'PARTNER_PROFIT',
                    title: '毛利',
                    formatter: function (value, row, index) {
                        return $.table.rmbFormatter(value);
                    }
                },
                {
                    field: 'FJ_POUNDAGE',
                    title: '附加手续费',
                    formatter: function (value, row, index) {
                        return $.table.rmbFormatter(value);
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>